Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(konnect): do not create Service+Route combinations for konghq.com/plugins annotated entities #659

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Sep 26, 2024

What this PR does / why we need it:

#644 introduced creation of KongPluginBindings based on konghq.com/plugins annotations on entities that can have plugins bound (for this specific PR Services and Routes have received support).

In order to do so, the operator needs to generate combinations of objects that should be set as targets of a plugin.

This in the operator is achieved using KongPluginBinding.

If a plugin annotation is set on a KongRoute r1 and KongService s1 operator has 3 options to create the binding:

  1. Create 2 bindings: 1 binding for KongRoute and 1 for KongService
  2. Create 2 bindings: 1 binding for KongRoute and KongService, and 1 for KongService
  3. Create 1 binding: for KongRoute and KongService

KIC uses the 1st approach backed by a UT in here.

This PR changes the behavior that has been introduced by #644 from 3 to 1 ( to align with KIC ).

Further discussion on this topic can take place in #660

@pmalek pmalek added this to the KGO v1.4.x milestone Sep 26, 2024
@pmalek pmalek self-assigned this Sep 26, 2024
@pmalek pmalek force-pushed the konnect-plugin-annotations-dont-create-sr-combinations branch from 8374bba to badc8a7 Compare September 26, 2024 16:16
@pmalek pmalek marked this pull request as ready for review September 26, 2024 16:22
@pmalek pmalek requested a review from a team as a code owner September 26, 2024 16:22
@pmalek pmalek force-pushed the konnect-plugin-annotations-dont-create-sr-combinations branch from badc8a7 to ec2db44 Compare September 26, 2024 17:13
@pmalek pmalek force-pushed the konnect-plugin-annotations-dont-create-sr-combinations branch from ec2db44 to 2d9cd71 Compare September 27, 2024 06:45
@pmalek pmalek enabled auto-merge (squash) September 27, 2024 06:46
@pmalek pmalek merged commit f7dba50 into main Sep 27, 2024
21 checks passed
@pmalek pmalek deleted the konnect-plugin-annotations-dont-create-sr-combinations branch September 27, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants